<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<link href="css/bootstrap.min.css" rel="stylesheet">
<script src="js/jquery-1.11.1.min.js"></script>
<script src="js/bootstrap.min.js"></script>
<script type="text/javascript">
    function suiji() {
        var number =(Math.random()*(9-0)).toFixed(0);
        var oText=document.getElementById("out");
        oText.value=number;
        var x=document.getElementById("xiao").value;
        var y=document.getElementById("da").value;
        var ji=2,num=0,nums;
        if(number<5){
            ji *= x;
            var oText=document.getElementById("ying");
            oText.value=ji;
        }
        else
        {
            ji*=y;
            var oText=document.getElementById("ying");
            oText.value=ji;
        }
        nums=ji+num;
        var oText=document.getElementById("zong");
        oText.value=nums;
    }
</script>
<script type="text/javascript">
    function gg() {
        var x=0;
        var y=3;
        mun=x+y;


        for (num>0;num=0;){
            s =sum+y;
        }
document.write("s");
    }
</script>

<style>
    div{
        width: 600px;
        height: 600px;
    }
</style>
<body>
<div>
    <table class="table table-bordered" style="text-align: center;height: 400px;">
        <tr>
            <td>本局赢了<input type="text" id="ying" style="width: 60px;">分</td>
            <td>一共有<input type="text" id="zong" style="width: 60px;">分</td>
        </tr>
        <tr>
            <td colspan="2">本轮的数字为<input type="text" id="out" style="width: 20px;"></td>
        </tr>
        <tr>
            <td>
                <h2>小</h2><br/>
                <input type="text" id="xiao" maxlength="3" onkeyup="this.value=this.value.replace(/[^0-9-]+/,'');"></td>
            <td>
                <h2>大</h2><br/>
                <input type="text" id="da" maxlength="3" onkeyup="this.value=this.value.replace(/[^0-9-]+/,'');"></td>
        </tr>
        <tr>
            <td><button onclick="suiji()">开始</button></td>
            <td><button>结算</button></td>
        </tr>
    </table>
</div>
</body>
</html>